<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Spring.boot 项目创建之傻瓜教程 | 云飞扬 - 个人博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="新建项目【File】–&amp;gt;【New】–&amp;gt;【Spring Starter Project】
填写项目信息
Name        项目名称
Location     文件位置
Type        选择Maven
Group        com.shaw.wap
Artifact    wap
version    0.0.1-SNAPSHOT
Description    描述
Pa">
<meta property="og:type" content="article">
<meta property="og:title" content="Spring.boot 项目创建之傻瓜教程">
<meta property="og:url" content="http://blog.yxxit.com/2017/01/22/Spring.boot 项目创建之傻瓜教程/index.html">
<meta property="og:site_name" content="云飞扬 - 个人博客">
<meta property="og:description" content="新建项目【File】–&amp;gt;【New】–&amp;gt;【Spring Starter Project】
填写项目信息
Name        项目名称
Location     文件位置
Type        选择Maven
Group        com.shaw.wap
Artifact    wap
version    0.0.1-SNAPSHOT
Description    描述
Pa">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-01.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-02.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-03.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-04.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-05.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-06.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-07.jpg">
<meta property="og:image" content="http://blog.yxxit.com/view/img/img-08.jpg">
<meta property="og:updated_time" content="2017-02-10T04:47:47.199Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Spring.boot 项目创建之傻瓜教程">
<meta name="twitter:description" content="新建项目【File】–&amp;gt;【New】–&amp;gt;【Spring Starter Project】
填写项目信息
Name        项目名称
Location     文件位置
Type        选择Maven
Group        com.shaw.wap
Artifact    wap
version    0.0.1-SNAPSHOT
Description    描述
Pa">
<meta name="twitter:image" content="http://blog.yxxit.com/view/img/img-01.jpg">
  
    <link rel="alternate" href="/atom.xml" title="云飞扬 - 个人博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/view/favicon.ico">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/view/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/view/" id="logo">云飞扬 - 个人博客</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/view/">Home</a>
        
          <a class="main-nav-link" href="/view/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://blog.yxxit.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-Spring.boot 项目创建之傻瓜教程" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/view/2017/01/22/Spring.boot 项目创建之傻瓜教程/" class="article-date">
  <time datetime="2017-01-22T15:37:18.014Z" itemprop="datePublished">2017-01-22</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Spring.boot 项目创建之傻瓜教程
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="新建项目"><a href="#新建项目" class="headerlink" title="新建项目"></a>新建项目</h2><h4 id="【File】–-gt-【New】–-gt-【Spring-Starter-Project】"><a href="#【File】–-gt-【New】–-gt-【Spring-Starter-Project】" class="headerlink" title="【File】–&gt;【New】–&gt;【Spring Starter Project】"></a>【File】–&gt;【New】–&gt;【Spring Starter Project】</h4><p><img src="/view/img/img-01.jpg" alt="新建项目"></p>
<h4 id="填写项目信息"><a href="#填写项目信息" class="headerlink" title="填写项目信息"></a>填写项目信息</h4><ul>
<li>Name        项目名称</li>
<li>Location     文件位置</li>
<li>Type        选择Maven</li>
<li>Group        com.shaw.wap</li>
<li>Artifact    wap</li>
<li>version    0.0.1-SNAPSHOT</li>
<li>Description    描述</li>
<li>Package    包结构<br><img src="/view/img/img-02.jpg" alt="New Spring Start Project"></li>
</ul>
<h4 id="选择Spring-Boot-版本"><a href="#选择Spring-Boot-版本" class="headerlink" title="选择Spring Boot 版本"></a>选择Spring Boot 版本</h4><p><img src="/view/img/img-03.jpg" alt="New Spring Start Project"></p>
<h4 id="导入架包"><a href="#导入架包" class="headerlink" title="导入架包"></a>导入架包</h4><p><img src="/view/img/img-04.jpg" alt="New Spring Start Project"></p>
<h4 id="项目结构"><a href="#项目结构" class="headerlink" title="项目结构"></a>项目结构</h4><p><img src="/view/img/img-05.jpg" alt="project"></p>
<h4 id="备注"><a href="#备注" class="headerlink" title="备注"></a>备注</h4><p>application.properties     配置信息<br>ShawSpringWapApplication main 方法</p>
<h2 id="启动服务"><a href="#启动服务" class="headerlink" title="启动服务"></a>启动服务</h2><h4 id="创建-HomeController-java"><a href="#创建-HomeController-java" class="headerlink" title="创建 HomeController.java"></a>创建 HomeController.java</h4><p><img src="/view/img/img-06.jpg" alt="创建HomeController"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line">package com.shaw.wap;</div><div class="line"></div><div class="line">import org.springframework.web.bind.annotation.RequestMapping;</div><div class="line">import org.springframework.web.bind.annotation.RequestMethod;</div><div class="line">import org.springframework.web.bind.annotation.RestController;</div><div class="line"></div><div class="line">@RestController</div><div class="line">public class HomeController &#123;</div><div class="line"></div><div class="line">	@RequestMapping(value=&quot;/hello&quot;,method=RequestMethod.GET)</div><div class="line">	public String Say()&#123;</div><div class="line">		return &quot;hello world!&quot;;</div><div class="line">	&#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h4 id="运行程序"><a href="#运行程序" class="headerlink" title="运行程序"></a>运行程序</h4><p><img src="/view/img/img-07.jpg" alt="运行程序"></p>
<h4 id="范围查看效果"><a href="#范围查看效果" class="headerlink" title="范围查看效果"></a>范围查看效果</h4><p>访问链接：<a href="http://localhost:8080/hello" target="_blank" rel="external">http://localhost:8080/hello</a></p>
<p><img src="/view/img/img-08.jpg" alt="查看结果"></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://blog.yxxit.com/view/2017/01/22/Spring.boot 项目创建之傻瓜教程/" data-id="ciy8twqj50000jkddim1ygxid" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/view/2017/02/09/node.js下用window.onerror捕获并上报Js错误/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          node.js下用window.onerror捕获并上报Js错误
        
      </div>
    </a>
  
  
    <a href="/view/2017/01/19/es5/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">ES5 新增特性汇总</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/view/tags/node-js-规范/">node.js, 规范</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/view/tags/node-js-规范/" style="font-size: 10px;">node.js, 规范</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/view/archives/2017/03/">March 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/view/archives/2017/02/">February 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/view/archives/2017/01/">January 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/view/2017/03/21/npm/">npm 常用命令</a>
          </li>
        
          <li>
            <a href="/view/2017/03/21/git/">Git 常用命令</a>
          </li>
        
          <li>
            <a href="/view/2017/03/05/windows nginx natapp/">windows nginx natapp</a>
          </li>
        
          <li>
            <a href="/view/2017/02/17/node.js 模块之 pm2/">node.js 模块之 pm2</a>
          </li>
        
          <li>
            <a href="/view/2017/02/16/node.js 6.9.4 升级/">node.js 6.9.4 升级</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 coolshaw<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/view/" class="mobile-nav-link">Home</a>
  
    <a href="/view/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>


  <link rel="stylesheet" href="/view/fancybox/jquery.fancybox.css">
  <script src="/view/fancybox/jquery.fancybox.pack.js"></script>


<script src="/view/js/script.js"></script>

  </div>
</body>
</html>